<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    console.log([] instanceof Array) // true

    function _instanceof (instance, constructor) {
        return instance?.constructor === constructor.prototype.constructor
    }

    console.log(_instanceof({}, Array));
    console.log(_instanceof([], Array));
    console.log(_instanceof(undefined, Array));
</script>
</body>
</html>
